package util;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import model.entity.product.Color;
import model.entity.product.ProductDetails;
import model.entity.product.Sizes;

public class GroupingUtil {
	public static Set<Sizes> groupSize(List<ProductDetails> listDetail) {
		HashSet<Sizes> resullt = new HashSet<Sizes>();
		
		for (ProductDetails detail : listDetail) {
			resullt.add(detail.getSizes());
		}
		
		return resullt;
	}
	
	public static Set<Color> groupColor(List<ProductDetails> listDetail) {
		HashSet<Color> resullt = new HashSet<Color>();
		
		for (ProductDetails detail : listDetail) {
			resullt.add(detail.getColor());
		}
		
		return resullt;
	}
}
